import axios from "axios";

// 创建 axios 实例
const request = axios.create({
  baseURL: 'http://127.0.0.1:3001/api',
  // timeout: 5000
});

// 请求拦截器
request.interceptors.request.use(config => {
  // 设置固定的 Bearer Token
  config.headers.Authorization = 'Bearer J644T01-ZEC4C6T-KPNE8WC-6BSG3JE';
  return config;
});

// 响应拦截器
request.interceptors.response.use(response => {
  return response.data;
});

export default request;
